package Sds

func (str8 *Str8) GetLen() uint64 {
	return uint64(str8.len)
}

func (str8 *Str8) SetValue(bts []byte) ISds {
	if uint64(len(bts)) > MaxType8 {
		sds := NewSds(bts)
		sds.SetValue(bts)
		return sds
	}
	copy(str8.char, bts)
	str8.len = uint8(len(bts))
	return str8
}

func (str8 *Str8) GetValues() []byte {
	return str8.char[0:str8.len]
}

func (str8 *Str8) GetFree() uint64 {
	return uint64(str8.free)
}
